package WeiXinPayV3;

import java.util.Random;
import java.util.UUID;


public class MathUtil {
	public static int random(){
		Random random = new Random();
		  int num = -1 ;
//		  while(true){
			  num = (int)(random.nextDouble()*(100000000- 10000000) + 10000000);
		 return num;
	 }

	
	
	public static int randomSix(){
		Random random = new Random();
		  int num = -1 ;
//		  while(true){
			  num = (int)(random.nextDouble()*(1000000- 100000) + 100000);
		 return num;
	 }
	public static int randomFour(){
		Random random = new Random();
		  int num = -1 ;
//		  while(true){
			  num = (int)(random.nextDouble()*(10000- 1000) + 1000);
		 return num;
	 }
	
	public static int randomByCount(int i){
		Random random = new Random();
		  int num = -1 ;
//		  while(true){
			  num = (int)(random.nextDouble()*(Math.pow(10,i)- Math.pow(10,i-1)) + Math.pow(10,i-1));
		 return num;
	 }
	
	public static void main(String[] args) {
        UUID uuid = UUID.randomUUID();
        System.out.println(uuid);
    }
}
